Skip to content

Guard against blank/short OIDs in lookup_commit#8640

Merged
iHiD merged 1 commit into
mainfrom
fix/8626
Feb 13, 2026
Merged

Guard against blank/short OIDs in lookup_commit#8640
iHiD merged 1 commit into
mainfrom
fix/8626

Conversation

@iHiD
Copy link
Copy Markdown
Member

@iHiD iHiD commented Feb 13, 2026

Closes #8626

Summary

  • Add early guard in Git::Repository#lookup_commit to raise MissingCommitError immediately for blank SHAs, avoiding a pointless fetch! call
  • Include the SHA value in all MissingCommitError messages so the malformed value is visible in error reports
  • Add track context (track_slug, synced_to_git_sha) to Sentry reports in UpdateTracksBuildStatusJob so the offending track can be identified and the data fixed upstream

Test plan

  • New tests verify blank and nil SHAs raise MissingCommitError without calling fetch!
  • Existing lookup_commit tests continue to pass
  • Full test/models/git/repository_test.rb passes (10 runs, 0 failures)

🤖 Generated with Claude Code

Raise MissingCommitError immediately for blank SHAs instead of
attempting a pointless fetch. Include the SHA value in all
MissingCommitError messages for easier debugging. Add track context
(slug and synced_to_git_sha) to Sentry reports in
UpdateTracksBuildStatusJob.

Closes #8626

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@iHiD iHiD merged commit f7e72cd into main Feb 13, 2026
41 checks passed
@iHiD iHiD deleted the fix/8626 branch February 13, 2026 13:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Git::MissingCommitError: Git::MissingCommitError (Git::MissingCommitError)

1 participant